html,
body {
    width: 100%;
    min-width: 700px;
    height: 100%;
    border: none;
    margin: 0;
    padding: 25px;
    box-sizing: border-box;
    .display-flex {
        display: flex;
        .flex {
            flex: 1;
        }
    }
    .items {
        padding: 80px 25px 50px 25px;
        box-sizing: border-box;
        border-bottom: 1px dashed #eee;
        position: relative;
        .demo-show-dialog {
            text-decoration: none;
            display: inline-block;
            padding: 8px 10px;
            background: #aa0;
            border-radius: 5px;
            font-size: 15px;
            color: #eee;
            &:active {
                box-shadow: inset 0 2px 5px rgba(0, 0, 0, .2);
            }
        }
        &:before {
            content: attr(data-title);
            font-size: 12px;
            background: #ccc;
            display: inline-block;
            position: absolute;
            top: 30px;
            left: 25px;
            color: #fff;
            padding: 2px 5px;
            border-radius: 3px;
        }
    }
}

//多级菜单
.menu,
.menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid #e0e0e0;
    width: 200px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.menu {
    ul {
        position: absolute;
        top: 0;
        left: 180px;
        opacity: 0;
        visibility: hidden;
        -webkit-transition: all .5s cubic-bezier(0.4, 0, 0.2, 1);
        -moz-transition: all .5s cubic-bezier(0.4, 0, 0.2, 1);
        -ms-transition: all .5s cubic-bezier(0.4, 0, 0.2, 1);
        transition: all .5s cubic-bezier(0.4, 0, 0.2, 1);
        &:before {
            content: "";
            display: inline-block;
            position: absolute;
            left: -7px;
            top: 5px;
            border-right: 7px solid #fff;
            border-top: 7px solid transparent;
            border-bottom: 7px solid transparent;
        }
    }
    li {
        border-bottom: 1px solid #eee;
        position: relative;
        line-height: 30px;
        span {
            display: block;
            padding: 0 10px;
            font-size: 12px;
            white-space: normal;
            cursor: pointer;
        }
        &:last-child {
            border-bottom: none;
        }
        &:hover {
            background: #f5f5f5;
            > ul {
                left: 200px;
                opacity: 1;
                visibility: visible;
                z-index: 10;
            }
        }
    }
}


//小贴士
.tip {
    cursor: pointer;
    position: relative;
    line-height: 30px;
    &:before,
    &:after {
        transition: all .24s ease 0s;
        -webkit-transition: all .36s ease 0s;
        z-index: 1;
        position: absolute;
        opacity: 0;
        transform: translateY(12px);
        -webkit- transform: translateY(12px)
    }
    &:before {
        content: " ";
        display: block;
        width: 0px;
        bottom: 25px;
        left: 5px;
        border-top: 5px solid #000;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
    }
    &:after {
        content: attr(data-title);
        background: #000;
        color: #fff;
        border-radius: 3px;
        font-size: 12px;
        padding: 0px 10px;
        text-align: center;
        line-height: 25px;
        white-space: normal;
        max-width: 500px;
        bottom: 29px;
        left: 0;
    }
    &:hover {
        &:before,
        &:after {
            opacity: 1;
            transform: translateY(0px);
            -webkit- transform: translateY(0px)
        }
    }
}

//五星打分
.star-box {
    overflow: hidden;
    .star-wrap {
        transform: rotate(180deg);
        -webkit-transform: rotate(180deg);
        display: inline-block;
        float: left;
        line-height: 30px;
        height: 30px;
        .star {
            color: #aaa;
            display: inline-block;
            cursor: pointer;
            font-size: 25px;
            transform: rotate(-180deg);
            -webkit-transform: rotate(-180deg);
            transition: color .24s ease 0s;
            -webkit-transition: color .24s ease 0s;
            &:hover {
                color: #ea9e0f;
            }
            &:hover ~ label {
                color: #ea9e0f;
            }
        }
        input[name='star'] {
            display: none;
            &:checked ~ label {
                color: #ea9e0f;
            }
        }
    }

    .star-cancel {
        transform: rotate(-180deg);
        -webkit-transform: rotate(-180deg);
        vertical-align: middle;
        line-height: 30px;
        height: 30px;
        cursor: pointer;
        background: #aaa;
        font-size: 12px;
        padding: 3px 5px;
        border-radius: 3px;
        margin-left: 10px;
        color: #fff;
        &:active {
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, .25);
        }
    }

    input[name='star'] {
        display: none;
    }
}






//loading
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 6px solid #333;
    border-radius: 52px;
    border-left-color: #fff;
    position: relative;
    animation: spin1 1.5s infinite linear;
    -webkit-animation: spin1 1.5s infinite linear;
    &:before {
        content: '';
        display: block;
        position: absolute;
        top: -12px;
        left: -12px;
        width: 60px;
        height: 60px;
        border: 2px solid #333;
        border-radius: 64px;
        border-right-color: #fff;
        transform: rotate(15deg);
        animation: spin2 .8s infinite linear;
        -webkit-animation: spin2 .8s infinite linear;
    }

    &:after {
        content: '';
        display: block;
        position: absolute;
        top: 3px;
        left: 3px;
        width: 25px;
        height: 25px;
        border: 4px solid #333;
        border-radius: 32px;
        border-bottom-color: #fff;
        transform: rotate(-15deg);
        animation: spin3 .5s infinite linear;
        -webkit-animation: spin3 .5s infinite linear;
    }
}



@keyframes spin1 {
    0% {
        transform: rotate(0deg)
    }
    100% {
        transform: rotate(359deg)
    }
}

@keyframes spin2 {
    0% {
        transform: rotate(359deg)
    }
    100% {
        transform: rotate(0deg)
    }
}

@keyframes spin3 {
    0% {
        transform: rotate(359deg)
    }
    100% {
        transform: rotate(0deg)
    }
}

//dialog
.show-dialog {
    width: 400px;
    height: auto;
    background: #fff;
    text-align: center;
    border-radius: 10px;
    overflow: hidden;
    position: fixed;
    z-index: 999;
    left: 50%;
    margin-left: -200px;
    top: -50%;
    transition: all .35s ease 0s;
    -webkit-transition: all .35s ease 0s;
    opacity: 0;
    transform: scale(.3);
    -webkit-transform: scale(.3);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1), 0 30px 80px rgba(0, 0, 0, 0.5);
    .dialog-header,
    .dialog-body,
    .dialog-footer {
        box-sizing: border-box;
        width: 100%;
        padding: 15px;
    }
    .dialog-header {
        font-weight: bold;
        font-size: 17px;
    }
    .dialog-body {
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        min-height: 100px;
    }
    .dialog-footer {
        padding: 0;
        .dialog-close {
            font-size: 13px;
            color: #aaa;
            text-decoration: none;
            display: block;
            padding: 15px;
            &:hover {
                color: #333;
                background: #f5f5f5;
            }
        }
    }
}

#show-dialog:target {
    top: 10%;
    opacity: 1;
    transform: scale(1);
    -webkit-transform: scale(1);
}

//toggle
.toggle {
    width: 100%;
    .toggle-item {
        box-sizing: border-box;
        &:last-child {
            border-bottom: none;
        }
        .toggle-content {
            background: #fff;
            box-sizing: border-box;
            padding: 15px;
            font-size: 13px;
            color: #555;
            display: none;
        }
        label {
            cursor: pointer;
            display: block;
            padding: 15px;
            background: #eee;
            border-top: 1px solid #e0e0e0;
            font-size: 15px;
            &:after {
                content: " ";
                display: inline-block;
                float: right;
                margin-top: 10px;
                border-top: 5px solid #aaa;
                border-left: 5px solid transparent;
                border-right: 5px solid transparent;
                transform: rotate(-90deg);
                -webkit-transform: rotate(-90deg);
                transition: all .3s ease 0s;
                -webkit-transition: all .3s ease 0s;
            }
        }
        input[type='radio'] {
            display: none;
            &:checked ~ .toggle-content {
                display: block;
                height: auto;
            }
            &:checked ~ label:after {
                transform: rotate(0deg);
                -webkit-transform: rotate(0deg);
            }
        }
    }
}

//table
.table {
    width: 100%;
    text-align: center;
    thead {
        font-weight: bold;
        background: #f5f5f5;
    }
    td {
        padding: 10px 0;
        border-bottom: 1px solid #e5e5e5;
    }
}

@media (max-width: 800px) {
    .table {
        thead {
            display: none;
        }
        tr {
            border: 3px solid #e0e0e0;
            display: block;
            margin-bottom: 5px;
            td {
                display: block;
                text-align: left;
                border-bottom: 1px dashed #e5e5e5;
                &:last-child {
                    border-bottom: none;
                }
                &:before {
                    content: attr(data-title);
                    display: inline-block;
                    text-align: left;
                    width: 50%;
                    float: left;
                    padding-left: 30px;
                    box-sizing: border-box;
                    font-size: 14px;
                    color: #aaa;
                }
            }
        }
    }
}
